﻿/* File Created: 三月 2, 2012 */
Sys.Application.add_init(onPageInit);

function onPageInit() {
    $addHandler($get("Submit"), "click", validate);
}

function validate() {
    if ($get("Title").value == "" || $get("Content").value == "") {
        if ($get("Title").value == "") {
            $get("TitleValidator").innerHTML = "标题不能为空！";
        }
        if ($get("Content").value == "") {
            $get("ContentValidator").innerHTML = "内容不能为空！";
        }

        return false;
    }

    return true;
}